import request from '@/utils/request'

// 查询耳标列表
export function listTagNumber(query) {
  return request({
    url: '/dgw/tagNumber/list',
    method: 'get',
    params: query
  })
}

// 查询耳标详细
export function getTagNumber(tagNumberId) {
  return request({
    url: '/dgw/tagNumber/' + tagNumberId,
    method: 'get'
  })
}

// 新增耳标
export function addTagNumber(data) {
  return request({
    url: '/dgw/tagNumber',
    method: 'post',
    data: data
  })
}

// 修改耳标
export function updateTagNumber(data) {
  return request({
    url: '/dgw/tagNumber',
    method: 'put',
    data: data
  })
}

// 删除耳标
export function delTagNumber(tagNumberId) {
  return request({
    url: '/dgw/tagNumber/' + tagNumberId,
    method: 'delete'
  })
}

// 导出耳标
export function exportTagNumber(query) {
  return request({
    url: '/dgw/tagNumber/export',
    method: 'get',
    params: query
  })
}

// 耳标核销
export function updateEarNumber(data) {
  return request({
    url: '/dgw/tagNumber/updateEarNumber',
    method: 'put',
    data: data
  })
}
// 替换耳标
export function updateEar(query) {
  return request({
    url: '/dgw/tagNumber/updateEar',
    method: 'put',
    params: query
  })
}
